﻿@model blacksoftFINAL.Models.Terminal

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>


@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <h4>Terminal</h4>
        <hr />
        @Html.ValidationSummary(true)

        <div class="form-group">
            @Html.LabelFor(model => model.Nombre, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Nombre)
                @Html.ValidationMessageFor(model => model.Nombre)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Descripcion, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Descripcion)
                @Html.ValidationMessageFor(model => model.Descripcion)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Direccion, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Direccion)
                @Html.ValidationMessageFor(model => model.Direccion)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Provincia, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Provincia)
                @Html.ValidationMessageFor(model => model.Provincia)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Departamento, "Departamento", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("Departamento", new[]
                {
                    new SelectListItem() {Text = "Tumbes", Value="Tumbes"},
                    new SelectListItem() {Text = "Piura", Value="Piura"},
                    new SelectListItem() {Text = "Lambayeque", Value="Lambayeque"},
                    new SelectListItem() {Text = "La Libertad", Value="La Libertad"},
                    new SelectListItem() {Text = "Pasco", Value="Pasco"},
                    new SelectListItem() {Text = "Junín", Value="Junín"},
                    new SelectListItem() {Text = "Huancavelica", Value="Huancavelica"},
                    new SelectListItem() {Text = "Cuzco", Value="Cuzco"},
                    new SelectListItem() {Text = "Ayacucho", Value="Ayacucho"},
                    new SelectListItem() {Text = "Apurímac", Value="Apurímac"},
                    new SelectListItem() {Text = "Amazonas", Value="Amazonas"},
                    new SelectListItem() {Text = "Ancash", Value="Ancash"},
                    new SelectListItem() {Text = "Loreto", Value="Loreto"},
                    new SelectListItem() {Text = "Lima", Value="Lima"},
                    new SelectListItem() {Text = "Ica", Value="Ica"},
                    new SelectListItem() {Text = "Arequipa", Value="Arequipa"},
                    new SelectListItem() {Text = "Moquegua", Value="Moquegua"},
                    new SelectListItem() {Text = "Tacna", Value="Tacna"},
                    new SelectListItem() {Text = "Cajamarca", Value="Cajamarca"},
                    new SelectListItem() {Text = "Puno", Value="Puno"},
                    new SelectListItem() {Text = "Madre de Dios", Value="Madre de Dios"},
                    new SelectListItem() {Text = "Ucayali", Value="Ucayali"},
                    new SelectListItem() {Text = "San Martin", Value="San Martin"},
                    new SelectListItem() {Text = "Huánuco", Value="Huánuco"}
                },"Seleccione")
                @Html.ValidationMessageFor(model => model.Departamento)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Telefono, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Telefono)
                @Html.ValidationMessageFor(model => model.Telefono)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Anexo, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Anexo)
                @Html.ValidationMessageFor(model => model.Anexo)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Email, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Email)
                @Html.ValidationMessageFor(model => model.Email)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Estado, "Estado", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("Estado", new[]
                {
                    new SelectListItem() {Text = "Activo", Value="Activo"},
                    new SelectListItem() {Text = "Inactivo", Value="Inactivo"}
                }, "Seleccione")
                @Html.ValidationMessageFor(model => model.Estado)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Tipo, "Tipo", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("Tipo", new[]
                {
                    new SelectListItem() {Text = "Terminal", Value="Terminal"},
                    new SelectListItem() {Text = "Unidad de Venta", Value="UnidadVenta"}
                }, "Seleccione")    
                @Html.ValidationMessageFor(model => model.Tipo)
            </div>
        </div>


        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

